package com.spboot.redis.contoller;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.spboot.redis.entity.User;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@RestController
@RequestMapping("/user")
public class UserController {

	@ApiOperation(value = "通过id获取用户")
	@GetMapping("/get")
	public User getUser(int id) {
		return new User();
	}

	@ApiImplicitParam(value = "页码", name = "pageNo")
	@ApiOperation(value = "获取用户列表")
	@GetMapping("/list")
	public List<User> list(int pageNo) {
		return null;
	}

	@ApiOperation(value = "获取用户列表")
	@PostMapping("/saveUser")
	public Boolean addUser(@RequestBody User user) {
		return true;
	}
}
